package com.guoguo.job;

import com.guoguo.entity.Statistical;
import com.guoguo.service.IStatisticalService;
import com.guoguo.service.impl.StatisticalServiceImpl;
import com.guoguo.utils.SpringUtil;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2017/9/25 0025.
 */

     /*
                           _ooOoo_
                          o8888888o
                          88" . "88
                          (| -_- |)
                          O\  =  /O
                       ____/`---'\____
                     .'  \\|     |//  `.
                    /  \\|||  :  |||//  \
                   /  _||||| -:- |||||-  \
                   |   | \\\  -  /// |   |
                   | \_|  ''\---/''  |   |
                   \  .-\__  `-`  ___/-. /
                 ___`. .'  /--.--\  `. . __
              ."" '<  `.___\_<|>_/___.'  >'"".
             | | :  `- \`.;`\ _ /`;.`/ - ` : | |
             \  \ `-.   \_ __\ /__ _/   .-` /  /
        ======`-.____`-.___\_____/___.-`____.-'======
                           `=---='
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                 佛祖保佑       永无BUG
        */
public class RankingJob implements Job {
    private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(RankingJob.class);
    @Resource
    private IStatisticalService iStatisticalService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        logger.info("================>>>>>>>    排行榜统计开始......");
        iStatisticalService = SpringUtil.getBean(IStatisticalService.class);

        iStatisticalService.CountRanking();
        logger.info("================>>>>>>>    排行榜统计结束......");

    }
}
